package com.ruoyi.basicData.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicData.mapper.WarehouseTablesMapper;
import com.ruoyi.basicData.domain.WarehouseTables;
import com.ruoyi.basicData.service.IWarehouseTablesService;

/**
 * 仓库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-06-25
 */
@Service
public class WarehouseTablesServiceImpl implements IWarehouseTablesService 
{
    @Autowired
    private WarehouseTablesMapper warehouseTablesMapper;

    /**
     * 查询仓库管理
     * 
     * @param warehouseId 仓库管理主键
     * @return 仓库管理
     */
    @Override
    public WarehouseTables selectWarehouseTablesByWarehouseId(Long warehouseId)
    {
        return warehouseTablesMapper.selectWarehouseTablesByWarehouseId(warehouseId);
    }

    /**
     * 查询仓库管理列表
     * 
     * @param warehouseTables 仓库管理
     * @return 仓库管理
     */
    @Override
    public List<WarehouseTables> selectWarehouseTablesList(WarehouseTables warehouseTables)
    {
        return warehouseTablesMapper.selectWarehouseTablesList(warehouseTables);
    }

    /**
     * 新增仓库管理
     * 
     * @param warehouseTables 仓库管理
     * @return 结果
     */
    @Override
    public int insertWarehouseTables(WarehouseTables warehouseTables)
    {
        warehouseTables.setCreateTime(DateUtils.getNowDate());
        return warehouseTablesMapper.insertWarehouseTables(warehouseTables);
    }

    /**
     * 修改仓库管理
     * 
     * @param warehouseTables 仓库管理
     * @return 结果
     */
    @Override
    public int updateWarehouseTables(WarehouseTables warehouseTables)
    {
        return warehouseTablesMapper.updateWarehouseTables(warehouseTables);
    }

    /**
     * 批量删除仓库管理
     * 
     * @param warehouseIds 需要删除的仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseTablesByWarehouseIds(Long[] warehouseIds)
    {
        return warehouseTablesMapper.deleteWarehouseTablesByWarehouseIds(warehouseIds);
    }

    /**
     * 删除仓库管理信息
     * 
     * @param warehouseId 仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseTablesByWarehouseId(Long warehouseId)
    {
        return warehouseTablesMapper.deleteWarehouseTablesByWarehouseId(warehouseId);
    }
}
